/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  Button,
  NativeModules,
 requireNativeComponent,
 Dimensions

} from 'react-native';
var tagVideoModule = NativeModules.tagPlayerModule;
var {height,width} =  Dimensions.get('window');
const TagPlayerModule = requireNativeComponent('tagPlayerModule', TagPlayerModule);
const TagVideoPlayerModule = requireNativeComponent('tagVideoPlayerModule', TagVideoPlayerModule);



export default class App extends Component<{}> {
  openVC (){
    tagVideoModule.RNOpenVCAndCallback((res)=>{
      alert(res);
    });
  }
  render() {
    return (
      <View style={styles.container}>
      {/* <TagPlayerModule style={styles.musicStyle} pathUrl={'https://ogroic7v0.qnssl.com/uploadimg/1540278878000.mp3'}></TagPlayerModule> */}
      <TagVideoPlayerModule style={styles.musicStyle} pathUrl={'http://jfz-gxq-public2.oss-cn-hangzhou.aliyuncs.com/m/kepu01.mp4'}></TagVideoPlayerModule>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
  musicStyle:{
    width:230,
    height:145,
    backgroundColor:'#f2f2f2',
    borderRadius:10
  }
});
